﻿//自动义双击方法
function CustomDbClick() {
    
}
//自定义新增方法
var fnCustomAdd = function () {
    window.parent.parent.$("#tabs").tabs('close', '新增渠道客户');
    var pagetitle = "新增渠道客户";
    parent.addTabs(pagetitle, '../Crm/BasePages/StartWorkflow.aspx?flag=0&entity=' + const_EditEntity + '&title=' + encodeURI(pagetitle) + '&WorktaskId=e6645636-402e-4ee3-a563-777aaed357e4&WorkflowId=4bdc2269-8c4f-48e1-8e58-f7c45a40873e');
    parent.NeedRefreshPage = this;
    //parent.parent.addTabs(pagetitle, '../Crm/Customer/AddCrmCustomerChannel.aspx?r=' + Math.random() + '&flag=1&entity=' + const_EditEntity + '&title=' + encodeURI(pagetitle));
    //parent.parent.NeedRefreshPage = this;
}
//自定义修改方法
var fnCustomEdit = function () {
    var recordID = myDataTable.getSelectedRows()[0];
    record = myDataTable.getRecord(recordID);
    var WorkflowInsId = record.getData("WorkFlowInsId");
    var WorktaskInsId = record.getData("WorkTaskInsId");
    if (WorkflowInsId != "" && WorkflowInsId != "00000000-0000-0000-0000-000000000000") {
        window.parent.parent.$("#tabs").tabs('close', '修改渠道客户');
        var pagetitle = "修改渠道客户";
        parent.parent.addTabs(pagetitle, '../Crm/Customer/AddCrmCustomerChannel.aspx?r=' + Math.random() + '&type=1&WorkflowInsId=' + WorkflowInsId + '&WorktaskInsId=' + WorktaskInsId + '&entity=' + const_EditEntity + '&title=' + encodeURI(pagetitle));
        parent.parent.NeedRefreshPage = this;
    } else {
        alert("流程实例ID为空,不能修改");
    }
}
//自定义删除方法
var fnCustomDeleteData = function () {
    YAHOO.example.container.dialog3.hide();
}